// components


class globalComponent{

    store ={}

    register(componentName:string, component){

        if(!this.store[componentName]){

            this.store[componentName] = component;

        }else{
            console.log(`had component ${componentName}`)
        }


    }

    bind(vue){

        const store = this.store
        
        Object.keys(store).forEach(key =>{
            vue.component(key, store[key])
        })
        
        
    }
    
}


const components = new globalComponent();


// 工具条 功能块
import funBlock from '@/components/ivew_components/fun_block/index.vue'
components.register('c-fun-block', funBlock)

// 工具条 车险搜索表单
import search_form from '@/components/ivew_components/search_form/index.vue'
components.register('c-table-search-bar', search_form)

// 工具条 审核搜素表单
import auditingSearchForm from '@/components/ivew_components/auditing_search_bar/index.vue'
components.register('c-auditing-search-bar', auditingSearchForm)

//加载提示
import loading from '@/components/ivew_components/loading/index.vue'
components.register('c-loading', loading)

// 状态标签
import statusLabel from '@/components/ivew_components/table_label_compoents/status.vue'
components.register('c-status-label', statusLabel)

// 布尔状态标签
import has from '@/components/ivew_components/table_label_compoents/has.vue'
components.register('c-has-label', has)

// 复制内容标签
import copyTxt from '@/components/ivew_components/table_label_compoents/copy_txt.vue'
components.register('c-copy-txt-label', copyTxt)

// 表单组件容器
import formBLockContainer from '@/components/ivew_components/form_block_container/index.vue'
components.register('c-form-block-container', formBLockContainer)

// 圆形icon按钮
import btnIconCircle from '@/components/ivew_components/btn_icon_circle/index.vue'
components.register('c-btn-icon', btnIconCircle)

// 容器块标题
import blockHeader from '@/components/ivew_components/block_header/index.vue'
components.register('c-block-header', blockHeader)

// 承保公司icon
import companyIcon from '@/components/ivew_components/company_icon/index.vue'
components.register('c-company-icon', companyIcon)

// 简单表单
import commonForm from '@/components/ivew_components/common_form/index.vue'
components.register('c-common-form', commonForm)

// 块选择器
import checkBlock from '@/components/ivew_components/check_block/index.vue'
components.register('c-check-block', checkBlock)

// 只读表单 信息块
import formReadonlyBlock from '@/components/ivew_components/car_form_detailed/info_item.vue'
components.register('c-form-readonly-block', formReadonlyBlock)

export default components